package org.flowers.unbeaten.service;


import com.baomidou.mybatisplus.extension.service.IService;
import org.flowers.unbeaten.base.entity.BaseEntity;
import org.flowers.unbeaten.base.entity.Department;
import org.flowers.unbeaten.base.vo.DepartmentVo;
import org.flowers.unbeaten.util.PageVo;

import java.util.List;

/**
 * <p>
 * 部门 服务类
 * </p>
 *
 * @author RyanWang
 * @since 2021-07-15
 */
public interface IDepartmentService extends IService<Department> {

    /**
     * 获取部门列表数据
     * @param department
     * @param baseEntity
     * @return
     */
    PageVo<Department> getDepartmentPageList(Department department, BaseEntity baseEntity);

    /**
     * 部门新增
     * @param department
     */
    void add(Department department);

    /**
     * 部门编辑
     * @param department
     */
    void edit(Department department);

    /**
     * 部门删除
     * @param ids
     */
    void delete(List<String> ids);

    /**
     * 部门详情
     * @param departmentId
     * @return
     */
    Department detail(String departmentId);

    /**
     * 获取组织机构层级机构
     * @return
     */
    List<DepartmentVo> getDepartmentPaths();

    /**
     * 递归获取所有的部门树
     * @return
     */
    List<DepartmentVo> getDepartmentAllTree();

}
